﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Yaml.Presentation.Parsing.TokenScanners {
    abstract class BasicTokenScanner : TokenScanner {
        private char tokenIdentifier;

        public BasicTokenScanner(Scanner scanner, char identifier)
            : base(scanner) {
            this.tokenIdentifier = identifier;
        }

        protected override bool CheckForToken() {
            return Reader.Peek() == tokenIdentifier;
        }

        protected override void ScanForToken() {
            // Assume that there is just the single character to scan over
            Scanner.Forward(1);
        }

    }
}
